<template>
  <div class="container">
    <div class="form">
      <!-- <div class="tips">
        <p>

          <el-tooltip
            class="item"
            effect="dark"
            content="请填写未注册的手机号"
            placement="top"
          >
            <i class="el-icon-warning-outline"></i>
          </el-tooltip>
        </p>
      </div> -->
      <el-form
        ref="form"
        :model="form"
        :rules="$rules"
        status-icon
        label-width="160px"
      >
        <el-form-item prop="customerName" :label="$language.local('企业名称')">
          <xy-input
            :placeholder="
              $language.local('请输入') + $language.local('企业名称')
            "
            v-model="form['customerName']"
            clearable
          ></xy-input>
        </el-form-item>

        <el-form-item
          prop="customTaxIdcd"
          :label="$language.local('统一社会信用代码')"
        >
          <xy-input
            :placeholder="
              $language.local('请输入') + $language.local('统一社会信用代码')
            "
            v-model="form['customTaxIdcd']"
            clearable
          ></xy-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="onSubmit">{{
          $language.local("注册")
        }}</el-button>
      </span>
    </div>
    <!-- <div class="right"></div> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        customerName: "客户名称",
        customTaxIdcd: "统一社会信用代码",
      },
    };
  },
  methods: {
    onSubmit() {
      console.log(this);
      this.$refs["form"].validate((valided) => {
        if (!valided) {
          return;
        }
        console.log(this.form);
        this.$router.push("merchant-info");
      });
    },
  },
};
</script>

<style lang="less" scoped>
.container {
  display: flex;
  width: 100%;
  justify-content: center;
  .form {
    // flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 0 5rem;
    margin: 5rem 0;
    .tips {
      width: 100%;
      color: #707070;
    }
    .el-form {
      width: 100%;
    }
    //border-right: 1px solid #aaa;
  }
  .right {
    flex: 1;
  }
}
</style>
